const mongoose = require("./db");

//用户列表
const listSchema = mongoose.Schema({
  name: String,
});

//用户列表
const userSchema = mongoose.Schema({
  username: String,
  password: String,
});
//闹钟
const clockSchema = mongoose.Schema({
  type: String,
  hour: Number,
  minute: Number,
});

//设备列表
const deviceSchema = mongoose.Schema({
  devName: String,
  devImg: String,
});
const listModel = mongoose.model("list", listSchema, "list");
const userModel = mongoose.model("user", userSchema, "user");
const clockModel = mongoose.model("clock", clockSchema, "clock");
const devModel = mongoose.model("device", deviceSchema, "device");

module.exports = {
  listModel,
  userModel,
  clockModel,
  devModel,
};
